-
Notifications
You must be signed in to change notification settings - Fork 15
Switch to getopt for command line parsing #169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
There is an intermittent bug when calling |
1234773 to
e596938
Compare
|
The intermittent bug seems unrelated to my changes since I can reproduce it on my other computer without these changes. I like this version better because Koder always forks to the background unless --wait is used. Without this change, the first instance of Koder will always block even without --wait. Reading data from stdin and sending it to the app might be complex and require a shared memory buffer or something, but that was already the case before this change. |
src/main.cpp
Outdated
| default: | ||
| _PrintUsage(); | ||
| return 1; | ||
| break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary break
|
I may end up closing this pull request and thinking about the problem more. I keep running into issues with whichever method I use. The most recent version is broken when being launched by Tracker and other apps. It's possible Koder may need a small companion app to handle some command line options, similar to |
What is the problem with this behavior? It's predictable - you want it to wait you use -w. EDIT: Unless I misunderstood and it currently blocks the first time - that's not how I remember coding it though.
I don't like the companion app solution because it's not very discoverable. Can you document the issues you ran into here so it can be taken into account when changing this part of code. |
Yes, it currently blocks the first time when
The short version is that it's difficult to fork the first instance of a BApplication into the background when launched by command line, while still allowing it to have access to any initial B_REFS_RECEIVED message when launched by GUI. I had a small conversation with waddlesplash in IRC to see if I could find a way around the problem. |
|
I still need to do some testing and cleanup but the latest version works well. I would have preferred to do things a bit differently but I think it's acceptable. |
Fixes #144